<?xml version="1.0" encoding="ISO-8859-1" ?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
	  xmlns:a4j="http://richfaces.org/a4j">
	
	<f:subview id="subviewManterFormaPagamento">
		<rich:modalPanel id="manterFormaPagamento" autosized="true" headerClass="height:20px;" resizeable="false" >
			<f:facet name="header">
				<h:outputText id="id_forma_pagamento" value="#{formaPagamentoBackBean.formaPagamentoFormBean.head}" />
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/images/close.gif" styleClass="botao_fechar_popup" id="hideLink">
						<rich:componentControl for="manterFormaPagamento" attachTo="hideLink" operation="hide" event="onclick" />
					</h:graphicImage>
				</h:panelGroup>
			</f:facet>
			<div class="red">
			<rich:messages id="msgFormaPagamentoManter"></rich:messages>
			</div>
			<a4j:form ajaxSubmit="true" id="formFormaPagamentoManter" reRender="formFormaPagamentoManter">
			
				<script type="text/javascript">		
					function valida() {
						if (#{facesContext.maximumSeverity == null}) {
							#{rich:component('manterFormaPagamento')}.hide();
						}
					}
				</script>
			
                <h:panelGrid columns="2">
                	<h:outputLabel value="#{bundle.forma_pagamento_codigo}:" for="forma_pagamento_codigo" />
                    <h:inputText id="forma_pagamento_codigo" value="#{formaPagamentoBackBean.formaPagamentoFormBean.formaPagamentoManter.codigo}" label="#{bundle.forma_pagamento_codigo}" readonly="true" disabled="#{formaPagamentoBackBean.formaPagamentoFormBean.isDisabled}" size="5" />
                    
                	<h:outputLabel value="#{bundle.forma_pagamento_descricao}*:" for="forma_pagamento_descricao" />
                    <h:inputText id="forma_pagamento_descricao" value="#{formaPagamentoBackBean.formaPagamentoFormBean.formaPagamentoManter.descricao}" label="#{bundle.forma_pagamento_descricao}" disabled="#{formaPagamentoBackBean.formaPagamentoFormBean.isDisabled}" maxlength="50" size="40" />
                </h:panelGrid>
                
                <div class="linha"/>
                
                <a4j:commandButton action="#{formaPagamentoBackBean.manterFormaPagamento}" value="#{bundle.forma_pagamento_btn_gravar}" id="btnGravar" reRender="formFormaPagamentoConsulta, formFormaPagamentoManter" disabled="#{formaPagamentoBackBean.formaPagamentoFormBean.isDisabled}" oncomplete="valida();" />
                <a4j:commandButton action="#{formaPagamentoBackBean.excluirFormaPagamento}" value="#{bundle.forma_pagamento_btn_excluir}" id="btnExcluir" reRender="formFormaPagamentoConsulta, formFormaPagamentoManter" disabled="#{!formaPagamentoBackBean.formaPagamentoFormBean.isDisabled}" oncomplete="valida();" />
                <a4j:commandButton value="#{bundle.forma_pagamento_btn_voltar}" id="btnVoltar" reRender="formFormaPagamentoConsulta, formFormaPagamentoManter" oncomplete="valida();" />
					
			</a4j:form>

		</rich:modalPanel>
	</f:subview>

</html>